CXX=g++
CXXFLAGS=-g -Wall `sdl-config --cflags` -I ~/usr/includes/irrlicht -I ../../include -I../include -I../graph -I ../
CXXLIBS_SDL=`sdl-config --libs` -lGL -lGLU
CXXLIBS_IRRLICHT=-L ~/usr/lib -lIrrlicht -lGL -lGLU -lXxf86vm -L ../lib
CXXLIBS_WIN_IRRLICHT=-L ../../lib -lIrrlicht
# no CXXLIBS_WIN_SDL, because I don't know how to do

all: way2go way2go_viewer

way2go_viewer: bsp_reader.o way2go_viewer.o bsp2zone.o
	$(CXX) $(CXXFLAGS) $(CXXLIBS) $(CXXLIBS_SDL) bsp_reader.o ../zone.cc bsp2zone.o ../segment.cc way2go_viewer.o ../Exception.cpp -o way2go_viewer

way2go: bsp_reader.o way2go.o bsp2zone.o
	$(CXX) $(CXXFLAGS) $(CXXLIBS) $(CXXLIBS_IRRLICHT) bsp_reader.o ../zone.cc bsp2zone.o ../segment.cc way2go.o ../Exception.cpp -o way2go

clean:
	rm -f *.o

distclean: clean
	rm -f way2go way2go_viewer *.exe

